package com.demo;

import java.io.*;
import java.util.Arrays;

public class Test {
    public static void main(String[] args) {
        File file = new File("C:\\Users\\Administrator\\Desktop\\weiyun");
        Arrays.stream(file.listFiles()).forEach(f->{

        });
        System.out.println(file.isDirectory());
    }

    public static String read(File file) throws IOException {
        BufferedReader reader = new BufferedReader(new FileReader(file.getPath()));
        String temp = "";
        StringBuffer sb = new StringBuffer();
        while ((temp = reader.readLine()) != null) {
            sb.append(temp);
        }
        System.out.println(sb);
        return sb.toString();
    }

}
